package com.sqb.hibernate.domain;

import org.junit.Before;
import org.junit.Test;

public class TestDao {
	
	public UserHome dao;
	
	@Before
	public void init(){
		dao = new UserHome();
	}
	
	@Test
	public void testFindById(){
		User user = dao.findById(1);
		System.out.println(user);
	}
	
	@Test
	public void testAttachDirty(){
		User user = dao.findById(1);
		user.setAge(20);
		dao.attachDirty(user);
		System.out.println(dao.findById(1));
	}
}
